#include "AVRControl.h"
#include "../../../bit/bit.h"


void setJTAGResetFlag(unsigned char flag)
{
	MCUCSR = SetBit(MCUCSR, JTRF, flag);
}
unsigned char getJTAGResetFlag()
{
	return GetBit(MCUCSR, JTRF);
}

void setWatchdogResetFlag(unsigned char flag)
{
	MCUCSR = SetBit(MCUCSR, WDRF, flag);
}
unsigned char getWatchdogResetFlag()
{
	return GetBit(MCUCSR, WDRF);
}

void setBrownoutResetFlag(unsigned char flag)
{
	MCUCSR = SetBit(MCUCSR, BORF, flag);
}
unsigned char getBrownoutResetFlag()
{
	return GetBit(MCUCSR, BORF);
}

void setExternalResetFlag(unsigned char flag)
{
	MCUCSR = SetBit(MCUCSR, EXTRF, flag);
}
unsigned char getExternalResetFlag()
{
	return GetBit(MCUCSR, EXTRF);
}

void setPoweronResetFlag(unsigned char flag)
{
	MCUCSR = SetBit(MCUCSR, PORF, flag);
}
unsigned char getPoweronResetFlag()
{
	return GetBit(MCUCSR, PORF);
}



